
{[if $pager->numPages gt 1]}
<div id="pager_{[$smarty.now]}"></div>

<script type="text/javascript">

$(function() {
	
	var options = {
		pageUrl: function(type, page, current) {
			return "javascript:void(0)";
			// return "javascript:void(0)\" onclick=\"list('{[$root]}{[$baseLink]}{[$p1]}{[$p2]}&p=" + page + "')";
		},
		onPageClicked: function(e,originalEvent, type, page){
			list('{[$root]}{[$baseLink]}{[$p1]}{[$p2]}&p=' + page);
        },
		itemTexts: function (type, page, current) {
            switch (type) {
            case "first":
                return "第一页";
            case "prev":
                return "上一页";
            case "next":
                return "下一页";
            case "last":
                return "末一页";
            case "page":
                return page;
            }
        },
        numberOfPages: 10,
		currentPage: {[$pager->CurrentPageID]},
		totalPages: {[$pager->numPages]},
		alignment: 'center'
	}

	$("div[id^='pager_']:visible").bootstrapPaginator(options);
});

</script>
{[/if]}
